export function request({
  url, 
  data, 
  params,
  method="get"
}) {
  return new Promise((resolve, reject)=> {
    let totalUrl = "http://101.35.25.8:5757/heyushuo/"+url
    console.log(totalUrl)
    wx.request({
      url:totalUrl,
      method,
      params,
      data,
      success: (res)=> {
        resolve(res)
      },
      fail: (err)=> {
        reject(err)
      }
    })
  })
  
}